package com.small.nacos.naming.misc;

import org.springframework.stereotype.Component;

import java.util.concurrent.TimeUnit;

/**
 * @Author zhoujin
 * @Date 2022/10/15 17:21
 */
@Component
public class SwitchDomain {

    private long clientBeatInterval = TimeUnit.SECONDS.toMillis(5);

    private boolean lightBeatEnabled = true;

    private long defaultCacheMillis = TimeUnit.SECONDS.toMillis(3);

    public long getClientBeatInterval() {
        return clientBeatInterval;
    }

    public void setClientBeatInterval(long clientBeatInterval) {
        this.clientBeatInterval = clientBeatInterval;
    }

    public boolean isLightBeatEnabled() {
        return lightBeatEnabled;
    }

    public void setLightBeatEnabled(boolean lightBeatEnabled) {
        this.lightBeatEnabled = lightBeatEnabled;
    }

    public long getDefaultCacheMillis() {
        return defaultCacheMillis;
    }
}
